<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditExtrapriceTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditExtrapriceLabel_id}" for="id" />
                    <h:inputText id="id" value="#{extrapriceController.selected.id}" title="#{bundle.EditExtrapriceTitle_id}" required="true" requiredMessage="#{bundle.EditExtrapriceRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditExtrapriceLabel_size}" for="size" />
                    <h:inputText id="size" value="#{extrapriceController.selected.size}" title="#{bundle.EditExtrapriceTitle_size}" required="true" requiredMessage="#{bundle.EditExtrapriceRequiredMessage_size}"/>
                    <h:outputLabel value="#{bundle.EditExtrapriceLabel_price}" for="price" />
                    <h:inputText id="price" value="#{extrapriceController.selected.price}" title="#{bundle.EditExtrapriceTitle_price}" required="true" requiredMessage="#{bundle.EditExtrapriceRequiredMessage_price}"/>
                    <h:outputLabel value="#{bundle.EditExtrapriceLabel_categoryId}" for="categoryId" />
                    <h:selectOneMenu id="categoryId" value="#{extrapriceController.selected.categoryId}" title="#{bundle.EditExtrapriceTitle_categoryId}" required="true" requiredMessage="#{bundle.EditExtrapriceRequiredMessage_categoryId}">
                        <f:selectItems value="#{categoryController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditExtrapriceLabel_extraId}" for="extraId" />
                    <h:selectOneMenu id="extraId" value="#{extrapriceController.selected.extraId}" title="#{bundle.EditExtrapriceTitle_extraId}" required="true" requiredMessage="#{bundle.EditExtrapriceRequiredMessage_extraId}">
                        <f:selectItems value="#{extraController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{extrapriceController.update}" value="#{bundle.EditExtrapriceSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditExtrapriceViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{extrapriceController.prepareList}" value="#{bundle.EditExtrapriceShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditExtrapriceIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
